import request from '@/config/axios'

// 招聘投诉 VO
export interface ComplaintsInfoVO {
  id: number // id
  complaintsName: string // 投诉名字
  complaintsPhone: string // 投诉电话
  complaintsDetail: string // 投诉详情
  complaintsPhoto: string // 联系电话
}

// 招聘投诉 API
export const ComplaintsInfoApi = {
  // 查询招聘投诉分页
  getComplaintsInfoPage: async (params: any) => {
    return await request.get({ url: `/crm/complaints-info/page`, params })
  },

  // 查询招聘投诉详情
  getComplaintsInfo: async (id: number) => {
    return await request.get({ url: `/crm/complaints-info/get?id=` + id })
  },

  // 新增招聘投诉
  createComplaintsInfo: async (data: ComplaintsInfoVO) => {
    return await request.post({ url: `/crm/complaints-info/create`, data })
  },

  // 修改招聘投诉
  updateComplaintsInfo: async (data: ComplaintsInfoVO) => {
    return await request.put({ url: `/crm/complaints-info/update`, data })
  },

  // 删除招聘投诉
  deleteComplaintsInfo: async (id: number) => {
    return await request.delete({ url: `/crm/complaints-info/delete?id=` + id })
  },

  // 导出招聘投诉 Excel
  exportComplaintsInfo: async (params) => {
    return await request.download({ url: `/crm/complaints-info/export-excel`, params })
  },
}